<template>
  <div class="headerInfo">
    <el-avatar :src="require('@/assets/avatar.png')"></el-avatar>
    <el-dropdown @command="handleCommand">
      <span class="el-dropdown-link">
        老胡来也<i class="el-icon-arrow-down el-icon--right"></i>
      </span>
      <el-dropdown-menu slot="dropdown">
        <el-dropdown-item command="/system/user/avatar">头像管理</el-dropdown-item>
        <el-dropdown-item command="/system/user/friend">好友管理</el-dropdown-item>
        <el-dropdown-item command="/logout">退出登录</el-dropdown-item>
      </el-dropdown-menu>
    </el-dropdown>
  </div>
</template>
<script>
export default {
  methods:{
    handleCommand:function(arg){
      this.$router.push(arg)
      // console.log(arg);
    }
  }
}
</script>
<style scoped>
.headerInfo {
  display: flex;
  justify-content: right;
  align-items: center;
}
.el-avatar{
  margin-right: 5px;
}
</style>